<template>
  <el-dialog
    v-model="dialogVisible"
    width="356px"
    style="
      background: #222222;
      border-radius: 9px;
      border: 1px solid rgba(255, 255, 255, 0.5);
      padding: 0;
    "
    :modal="false"
    :before-close="close"
    align-center
    @close="close"
  >
    <template #header>
      <div class="title">音效设置</div>
    </template>
    <template #default>
      <div class="dialog-content">
        <div class="subtitle">
          <img class="icon" src="@/assets/live/room/atmosphere.svg" />
          <span class="m-l-4">气氛音效</span>
        </div>
        <div class="content">
          <div v-for="i in 6" class="item">
            <div class="pic"></div>
            <div class="desc">微微一笑</div>
          </div>
        </div>
      </div>
      <div class="dialog-content" style="border: none">
        <div class="subtitle">
          <img class="icon" src="@/assets/live/room/voice.svg" />
          <span class="m-l-4">人声音效</span>
        </div>
        <div class="content" style="gap: 12px 30px">
          <div v-for="i in 6" class="item">
            <div class="avator">
              <img class="selected" :src="selectedPic" />
            </div>
            <div class="desc">微微一笑</div>
          </div>
        </div>
      </div>
    </template>
  </el-dialog>
</template>
<script lang="ts" setup>
import { ref } from "vue";
import selectedPic from "@/assets/live/selected_red_circle.svg";

const dialogVisible = ref(false);
// 显示
const show = () => {
  dialogVisible.value = true;
};

// 关闭前的回调
const close = () => {
  dialogVisible.value = false;
};

defineExpose({ show, close });
</script>
<style lang="scss" scoped>
.title {
  padding: 15px 32px 0px;
  font-size: 16px;
  color: #fff;
}
.dialog-content {
  border-top: 1px solid rgba(216, 216, 216, 0.5);
  border-bottom: 1px solid rgba(216, 216, 216, 0.5);
  padding: 20px 20px 30px;
  color: #fff;
  .subtitle {
    font-size: 12px;
    display: flex;
    align-items: center;
    .icon {
      width: 16px;
      height: 16px;
      padding: 2px;
    }
  }
  .content {
    margin: 15px 0 10px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    .item {
      display: flex;
      flex-direction: column;
      align-items: center;
      font-size: 10px;
      min-width: 50px;

      .pic {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        background-color: lightblue;
      }
      .desc {
        margin-top: 8px;
        font-size: 8px;
      }
      .avator {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background-color: lightblue;
        position: relative;
        .selected {
          width: 18px;
          height: 18px;
          background-color: lightcoral;
          position: absolute;
          bottom: 0;
          right: 0;
          border-radius: 50%;
        }
      }
    }
  }
}
</style>
